package kr.hkit.powerjava.chapter23.lab;

public class Enermy extends GraphicObject {

	int dx= -10;
	
	public Enermy(String name) {
		super(name);
		x = 500;
		y = 0;
	}

	public void update(){
		x+=dx;
		if(x < 0){
			dx = +10;
		}else if(x > 500){
			dx = -10;
		}
	}
}
